/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Tables;

/**
 *
 * @author rehgon
 */

import java.sql.*;

public class Fertigungsplan {
    
    public static Connection connectToDB() {
        
        Connection conn = null;
        
        try {
            Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
            conn = DriverManager.getConnection("jdbc:sqlserver://www.rehgon.ch;Database=Fertigungsplan", "dmg", "abcd1234");
        } catch (Exception ex) {
            System.out.println(ex.getMessage());        
        } finally {
            return conn;
        }
    }
}
